﻿#include "progressinfo.h"

ProgressInfo::ProgressInfo(QObject *parent) : QObject(parent)
{

}

ProgressInfo::ProgressInfo(const ProgressInfo &other)
{
    enabled = other.enabled;
    runTime = other.runTime;
    cpuUsage = other.cpuUsage;
    stateMsg = other.stateMsg;
    memory = other.memory;
    virtualMemory = other.virtualMemory;
    ioRead = other.ioRead;
    ioWrite = other.ioWrite;
}

ProgressInfo &ProgressInfo::operator=(const ProgressInfo &other)
{
    enabled = other.enabled;
    runTime = other.runTime;
    cpuUsage = other.cpuUsage;
    stateMsg = other.stateMsg;
    memory = other.memory;
    virtualMemory = other.virtualMemory;
    ioRead = other.ioRead;
    ioWrite = other.ioWrite;
    return *this;
}

ProgressInfo::~ProgressInfo()
{

}

void ProgressInfo::clear()
{
    enabled = false;
    runTime = 0;
    cpuUsage = 0;
    stateMsg = "";
    memory = 0;
    virtualMemory = 0;
    ioRead = 0;
    ioWrite = 0;
}

bool ProgressInfo::getEnabled() const
{
    return enabled;
}

void ProgressInfo::setEnabled(bool value)
{
    enabled = value;
}

uint64_t ProgressInfo::getRunTime() const
{
    return runTime;
}

void ProgressInfo::setRunTime(const uint64_t &value)
{
    runTime = value;
}

float ProgressInfo::getCpuUsage() const
{
    return cpuUsage;
}

void ProgressInfo::setCpuUsage(float value)
{
    cpuUsage = value;
}

uint64_t ProgressInfo::getMemory() const
{
    return memory;
}

void ProgressInfo::setMemory(const uint64_t &value)
{
    memory = value;
}

uint64_t ProgressInfo::getVirtualMemory() const
{
    return virtualMemory;
}

void ProgressInfo::setVirtualMemory(const uint64_t &value)
{
    virtualMemory = value;
}

uint64_t ProgressInfo::getIoRead() const
{
    return ioRead;
}

void ProgressInfo::setIoRead(const uint64_t &value)
{
    ioRead = value;
}

uint64_t ProgressInfo::getIoWrite() const
{
    return ioWrite;
}

void ProgressInfo::setIoWrite(const uint64_t &value)
{
    ioWrite = value;
}

QString ProgressInfo::getStateMsg() const
{
    return stateMsg;
}

void ProgressInfo::setStateMsg(const QString &value)
{
    stateMsg = value;
}
